package com.zian.domain.po;

import com.baomidou.mybatisplus.annotation.*;


import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author
 * @since 2024-09-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_carousel")
@ApiModel(description = "SysCarousel对象")
public class SysCarousel implements Serializable {


    private static final long serialVersionUID = 1L;

    @ApiModelProperty( "首页轮播图主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty( "轮播图")
    private String carouselUrl;

    @ApiModelProperty( "点击后的跳转地址(默认不跳转)")
    private String redirectUrl;

    @ApiModelProperty( "排序值(字段越大越靠前)")
    private Integer carouselRank;

    @ApiModelProperty( "删除标识字段(0-未删除 1-已删除)")
    private Integer isDeleted;

    @ApiModelProperty( "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty( "创建者id")
    private Integer createUser;

    @ApiModelProperty( "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty( "修改者id")
    private Integer updateUser;


}
